package com.vshop.service.impl;

import com.vshop.entity.comentity.UserInfoReport;
import com.vshop.mapper.UserInfoReportMappper;
import com.vshop.service.UserInfoReportService;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import javax.annotation.Resource;
import java.util.List;


@Transactional(rollbackFor = Exception.class)
@Service
public class UserInfoReportServiceImpl implements UserInfoReportService {
    @Resource
    UserInfoReportMappper userInfoReportMappper;

    @Override
    public List<UserInfoReport> queryDeviceCodeByOpenId(String openId, String partnerCode) {
        return userInfoReportMappper.queryDeviceCodeByOpenId(openId, partnerCode);
    }

    @Override
    public void insertWeixinHavaCardAndExpressInfo(UserInfoReport userInfoReport) {
        userInfoReportMappper.insertWeixinHavaCardAndExpressInfo(userInfoReport);
    }

    @Override
    public int queryWeixinHavaCardAndExpressInfo(String partnerCode, String openId, String deviceCode, String recipientName, String recipientPhone, String recipientAddress, String recipientCompany, String recipientEmail, String expressType, String expressPrice) {
        return userInfoReportMappper.queryWeixinHavaCardAndExpressInfo(partnerCode, openId, deviceCode, recipientName, recipientPhone, recipientAddress, recipientCompany, recipientEmail, expressType, expressPrice);
    }

    @Override
    public int queryWeixinHavaCard(String partnerCode, String openId, String deviceCode) {
        return userInfoReportMappper.queryWeixinHavaCard(partnerCode, openId, deviceCode);
    }

    @Override
    public void insertWeixinHavaCard(UserInfoReport userInfoReport) {
        userInfoReportMappper.insertWeixinHavaCard(userInfoReport);
    }

    @Override
    public int queryWeixinNoCardAndExpressInfo(String openId, String partnerCode, String recipientName, String recipientPhone, String recipientAddress, String recipientCompany, String recipientEmail, String expressType, String expressPrice) {
        return userInfoReportMappper.queryWeixinNoCardAndExpressInfo(openId, partnerCode, recipientName, recipientPhone, recipientAddress, recipientCompany, recipientEmail, expressType, expressPrice);
    }

    @Override
    public void insertWeixinNoCardAndExpressInfo(UserInfoReport userInfoReport) {
        userInfoReportMappper.insertWeixinNoCardAndExpressInfo(userInfoReport);
    }

    @Override
    public int queryWeixinNoCard(String partnerCode, String openId) {
        return userInfoReportMappper.queryWeixinNoCard(partnerCode, openId);
    }

    @Override
    public void insertWeixinNoCard(UserInfoReport userInfoReport) {
        userInfoReportMappper.insertWeixinNoCard(userInfoReport);
    }

    @Override
    public int queryWebHavaCardAndExpressInfo(String partnerCode, String deviceCode, String recipientName, String recipientPhone, String recipientAddress, String recipientCompany, String recipientEmail, String expressType, String expressPrice) {
        return userInfoReportMappper.queryWebHavaCardAndExpressInfo(partnerCode, deviceCode, recipientName, recipientPhone, recipientAddress, recipientCompany, recipientEmail, expressType, expressPrice);
    }

    @Override
    public void insertWebHavaCardAndExpressInfo(UserInfoReport userInfoReport) {
        userInfoReportMappper.insertWebHavaCardAndExpressInfo(userInfoReport);
    }

    @Override
    public int queryWebHavaCard(String partnerCode, String deviceCode) {
        return userInfoReportMappper.queryWebHavaCard(partnerCode, deviceCode);
    }

    @Override
    public void insertWebHavaCard(UserInfoReport userInfoReport) {
        userInfoReportMappper.insertWebHavaCard(userInfoReport);
    }

    @Override
    public int queryWebNoCardAndExpressInfo(String partnerCode, String recipientName, String recipientPhone, String recipientAddress, String recipientCompany, String recipientEmail, String expressType, String expressPrice) {
        return userInfoReportMappper.queryWebNoCardAndExpressInfo(partnerCode, recipientName, recipientPhone, recipientAddress, recipientCompany, recipientEmail, expressType, expressPrice);
    }

    @Override
    public void insertWebNoCardAndExpressInfo(UserInfoReport userInfoReport) {
        userInfoReportMappper.insertWebNoCardAndExpressInfo(userInfoReport);
    }
}
